﻿using UnityEngine;
using System.Collections;
using UnityEditor;

public class Heater
{
    private int peint;
    public delegate void delegateHander(int perint);
    public event delegateHander deleEvet;

    public void ShaoShui()
    {
        for(int i = 0;i< 100;i++)
        {
            peint = i;
            if (peint > 95)
                deleEvet(peint);
        }
    }
}

public class Alarm
{
    public void MakeAlert(int pe)
    {
        Debug.LogError("报警器。。。。。。。。" + pe);
    }
}

public class DisPlay
{
    public void MakeAlert(int pe)
    {
        Debug.LogError("报警器。。。。。。。。" + pe);
    }
}

public class delegate_test_three
{ 
    [MenuItem("delegate/委托、事件与OBserver")]
    public static void add()
    {
        Debug.LogError("hello world!>>>");
    }
}
